package com.lcdpg.lcdp.auth.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName LoginRequest.java
 * @Description TODO
 * @createTime 2025年05月23日 17:13:00
 */
@Data
@Schema(description = "登录用户实体")
public class LoginRequest {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 4, max = 20, message = "用户名长度需在4-20位之间")
    @Schema(description = "用户名", example = "1123")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度需在6-20位之间")
    @Schema(description = "密码", example = "1123123")
    private String password;

    public LoginRequest(String username, String password) {
        this.username = username;
        this.password = password;
    }
}
